/**
 * Created by minigci.he on 16/9/20.
 */
console.log('-----------------------------')
console.log('test6')

let a = new Set([1,2,3])
let b = new Set([4,3,2])

// 并集
let union = new Set([...a, ...b])
console.log(union)  // {1, 2, 3, 4}
// 交集
let intersect = new Set([...a].filter(x => b.has(x)))
console.log(intersect)  // {2, 3}
// 差集
let difference = new Set([...a].filter(x => !b.has(x)))
console.log(difference) // {1}

